/**
 * 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
 * <p>
 * Compile: JDK 1.6+
 * <p>
 * 版权所有(C)：江苏欧索软件有限公司
 * <p>
 * 公司名称：江苏欧索软件有限公司
 * <p>
 * 公司地址：中国苏州科技城青山路1号
 * <p>
 * 网址: http://www.oceansoft.com.cn
 * <p>
 * 作者: 090922(陈伟)
 * <p>
 * 文件名: com.oceansoft.mobile.econsole.modules.apps.entity.AppInfo.java
 * <p>
 * 类产生时间: 2014/4/29 0029 下午 22:09
 * <p>
 * 负责人: 090922(陈伟)
 * <p>
 * Email:javacspring@gmail.com
 * <p>
 * 所在组 : 掌上公安应用平台
 * <p>
 * 所在部门: 开发部--手持技术部
 * <p>
 * <p>
 */
package com.oceansoft.mobile.econsole.modules.apps.entity;

import com.oceansoft.mobile.econsole.common.constant.ConfigInfo;
import com.oceansoft.mobile.econsole.common.util.StringUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 应用信息
 *
 * @author: chenw
 * @time: 2014/4/29 0029 下午 22:09
 */
public class AppInfo {

    private int id;
    private String title;//应用标题
    private String icon;//应用图片
    private String url;//应用首页地址
    private int status;//应用状态
    private String desc;
    private String contact;
    private Date regTime;
    private Date modTime;
    private String token;
    private String contactTel;
    private int appSize;
    private int power;   //用户访问权限
    private String snapImg;
    private List<String> snapImgPath;     //提供给手机端应用完整图片路径 多张
    private String vendor;
    private int versionCode;
    private String versionName = "1.0";
    private String path;
    private String pluginMd5;   //应用插件地址
    private int accessLevel;
    private String appType;//应用插件类型 1：html5插件 2:原生APP应用
    private String startPage;//插件启动页，如果原生apk则为包名+启动页名称
    private List<MenuGroup> menuGroups;
    private List<AppVersion> versionGroups;
    private byte[] appContent;
    private byte[] iconContent;
    private int sort;

    public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public void setImgPath(ConfigInfo configInfo) {
        if (StringUtils.isNotEmpty(this.snapImg)) {
            snapImgPath = new ArrayList<String>();
            String[] uuid = this.snapImg.split(";");
            for (String u : uuid) {
                snapImgPath.add(configInfo.getFileDownloadUrl(configInfo.getIconDir() + "/" + u + ".png"));
            }
        }
    }

    public byte[] getAppContent() {
        return appContent;
    }

    public void setAppContent(byte[] appContent) {
        this.appContent = appContent;
    }

    public byte[] getIconContent() {
        return iconContent;
    }

    public void setIconContent(byte[] iconContent) {
        this.iconContent = iconContent;
    }

    public int getAppSize() {
        return appSize;
    }

    public void setAppSize(int appSize) {
        this.appSize = appSize;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public List<MenuGroup> getMenuGroups() {
        return menuGroups;
    }

    public void setMenuGroups(List<MenuGroup> menuGroups) {
        this.menuGroups = menuGroups;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public Date getRegTime() {
        return regTime;
    }

    public void setRegTime(Date regTime) {
        this.regTime = regTime;
    }

    public Date getModTime() {
        return modTime;
    }

    public void setModTime(Date modTime) {
        this.modTime = modTime;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    public String getSnapImg() {
        return snapImg;
    }

    public void setSnapImg(String snapImg) {
        this.snapImg = snapImg;
    }

    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    public int getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(int versionCode) {
        this.versionCode = versionCode;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getPluginMd5() {
        return pluginMd5;
    }

    public void setPluginMd5(String pluginMd5) {
        this.pluginMd5 = pluginMd5;
    }

    public int getAccessLevel() {
        return accessLevel;
    }

    public List<AppVersion> getVersionGroups() {
        return versionGroups;
    }

    public void setVersionGroups(List<AppVersion> versionGroups) {
        this.versionGroups = versionGroups;
    }

    public void setAccessLevel(int accessLevel) {
        this.accessLevel = accessLevel;
    }

    public List<String> getSnapImgPath() {
        return snapImgPath;
    }

    public void setSnapImgPath(List<String> snapImgPath) {
        this.snapImgPath = snapImgPath;
    }

    public String getAppType() {
        return appType;
    }

    public void setAppType(String appType) {
        this.appType = appType;
    }

    public String getStartPage() {
        return startPage;
    }

    public void setStartPage(String startPage) {
        this.startPage = startPage;
    }
}
